import request from '../ulit/request'

export function getRoleList () {
    return request({
        url: '/role'
    })
}
export function getRoleDetail (id) {
    return request({
        url: `/role/${id}`
    })
}
export function addRole (data) {
    return request({
        url: `/role`,
        method: 'post',
        data
    })
}
export function delRole (id) {
    return request({
        url: `/role/${id}`,
        method: 'delete'
    })
}
export function updateRole (data) {
    return request({
        url: `/role/${data.id}`,
        method: 'put',
        data
    })
}